<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>VUE第二天 表单输入</title>
</head>
<body>
  <div id="app"> 
    <p>1.input</p>
    <input type="text" v-model="val1">
    <p>{{val1}}</p>
    <hr>
    <p>2.textarea</p>
    <textarea v-model="val2"></textarea>
    <p>{{val2}}</p>
    <hr>
    <p>3.单选框</p>
    <span>你的性别：</span>
    <label for="">
      <input type="radio" v-model="val3" value="1">
      <span>男</span>
    </label>
    <label for="">
      <input type="radio" v-model="val3" value="2">
      <span>女</span>
    </label>
    <p>{{val3}}</p>
    <hr>
    <p>4.多选</p>
    <span>你的爱好：</span>
    <label for="">
      <input type="checkbox" v-model="val4" name="" id="" value="chang">
      <span>唱</span>
    </label>
    <label for="">
      <input type="checkbox" v-model="val4" name="" id="" value="tiao">
      <span>跳</span>
    </label>
    <p>{{val4}}</p>
    <hr>
    <p>5.下拉选框</p>
    <span>收货地址：</span>
    <select name="" id="" v-model="val5">
      <option value="1">家</option>
      <option value="2">公司</option>
      <option value="3">学校</option>
      <option value="4">蜂巢</option>
    </select>
    <p>{{val5}}</p>
    <hr>
    <p>6.下拉多选</p>
    <p>爱好</p>
    <select v-model="val6" multiple>
      <option value="1">唱</option>
      <option value="2">跳</option>
      <option value="3">rap</option>
      <option value="4">打篮球</option>
    </select>
    <p>{{val6}}</p>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        val1: '默认值1',
        val2: '',
        val3: '1',
        val4: ['chang'],
        val5: '',
        val6: []
      }
    })
  </script>
</body>
</html>